Optimal. Leaf size=49 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{(a+b)^{3/2}}-\frac {1}{(a+b) \sqrt {a+b \tanh ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3751, 455, 53,
65, 214} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{(a+b)^{3/2}}-\frac {1}{(a+b) \sqrt {a+b \tanh ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 53
Rule 65
Rule 214
Rule 455
Rule 3751
Rubi steps
\begin {align*} \int \frac {\tanh (x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx &=\text {Subst}\left (\int \frac {x}{\left (1-x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tanh (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{(1-x) (a+b x)^{3/2}} \, dx,x,\tanh ^2(x)\right )\\ &=-\frac {1}{(a+b) \sqrt {a+b \tanh ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{(1-x) \sqrt {a+b x}} \, dx,x,\tanh ^2(x)\right )}{2 (a+b)}\\ &=-\frac {1}{(a+b) \sqrt {a+b \tanh ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tanh ^2(x)}\right )}{b (a+b)}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{(a+b)^{3/2}}-\frac {1}{(a+b) \sqrt {a+b \tanh ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.02, size = 41, normalized size = 0.84 \begin {gather*} -\frac {\, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\frac {a+b \tanh ^2(x)}{a+b}\right )}{(a+b) \sqrt {a+b \tanh ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(272\) vs.
\(2(41)=82\).
time = 0.66, size = 273, normalized size = 5.57
method | result | size |
derivativedivides | \(-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}-\frac {b \left (2 b \left (1+\tanh \left (x \right )\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(273\) |
default | \(-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}-\frac {b \left (2 b \left (1+\tanh \left (x \right )\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(273\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 856 vs.
\(2 (41) = 82\).
time = 0.45, size = 2277, normalized size = 46.47 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 11.06, size = 51, normalized size = 1.04 \begin {gather*} - \frac {1}{\left (a + b\right ) \sqrt {a + b \tanh ^{2}{\left (x \right )}}} - \frac {\operatorname {atan}{\left (\frac {\sqrt {a + b \tanh ^{2}{\left (x \right )}}}{\sqrt {- a - b}} \right )}}{\sqrt {- a - b} \left (a + b\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 318 vs.
\(2 (41) = 82\).
time = 0.55, size = 318, normalized size = 6.49 \begin {gather*} -\frac {\frac {{\left (a^{2} b + a b^{2}\right )} e^{\left (2 \, x\right )}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}} + \frac {a^{2} b + a b^{2}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}}{\sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}} + \frac {\sqrt {a + b} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {\sqrt {a + b} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {\log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, {\left (a + b\right )}^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.94, size = 41, normalized size = 0.84 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a}}{\sqrt {a+b}}\right )}{{\left (a+b\right )}^{3/2}}-\frac {1}{\left (a+b\right )\,\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________